/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package rssclient;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author jpareyes
 */
@Entity
@Table(name = "FEED")
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "Feed.findAll", query = "SELECT f FROM Feed f"),
        @NamedQuery(name = "Feed.findByCodFeed", query = "SELECT f FROM Feed f WHERE f.codFeed = :codFeed"),
        @NamedQuery(name = "Feed.findByUrlFeed", query = "SELECT f FROM Feed f WHERE f.urlFeed = :urlFeed"),
        @NamedQuery(name = "Feed.findByTituloFeed", query = "SELECT f FROM Feed f WHERE f.tituloFeed = :tituloFeed"),
        @NamedQuery(name = "Feed.findByDescripcionFeed", query = "SELECT f FROM Feed f WHERE f.descripcionFeed = :descripcionFeed")})
public class Feed implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @Column(name = "COD_FEED")
        private String codFeed;
        @Column(name = "URL_FEED")
        private String urlFeed;
        @Column(name = "TITULO_FEED")
        private String tituloFeed;
        @Column(name = "DESCRIPCION_FEED")
        private String descripcionFeed;

        public Feed() {
        }

        public Feed(String codFeed) {
                this.codFeed = codFeed;
        }

        public String getCodFeed() {
                return codFeed;
        }

        public void setCodFeed(String codFeed) {
                this.codFeed = codFeed;
        }

        public String getUrlFeed() {
                return urlFeed;
        }

        public void setUrlFeed(String urlFeed) {
                this.urlFeed = urlFeed;
        }

        public String getTituloFeed() {
                return tituloFeed;
        }

        public void setTituloFeed(String tituloFeed) {
                this.tituloFeed = tituloFeed;
        }

        public String getDescripcionFeed() {
                return descripcionFeed;
        }

        public void setDescripcionFeed(String descripcionFeed) {
                this.descripcionFeed = descripcionFeed;
        }

        @Override
        public int hashCode() {
                int hash = 0;
                hash += (codFeed != null ? codFeed.hashCode() : 0);
                return hash;
        }

        @Override
        public boolean equals(Object object) {
                // TODO: Warning - this method won't work in the case the id fields are not set
                if (!(object instanceof Feed)) {
                        return false;
                }
                Feed other = (Feed) object;
                if ((this.codFeed == null && other.codFeed != null) || (this.codFeed != null && !this.codFeed.equals(other.codFeed))) {
                        return false;
                }
                return true;
        }

        @Override
        public String toString() {
                return "rssclient.Feed[ codFeed=" + codFeed + " ]";
        }
        
}
